package com.my.feign;

import com.atguigu.springcloud.entities.Payment;
import com.baomidou.mybatisplus.extension.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
没有配置降级。。采用自定义
* */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",contextId = "iTestFeignNoFallBack")
public interface ITestFeignNoFallBack {

    String API_PREFIX = "/feign/payment";

    @GetMapping(API_PREFIX + "/findOne")
    R<Payment> findOne(@RequestParam("id") Long id);

    @GetMapping(API_PREFIX + "/timeOut")
    R timeOut();
}
